Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit ca2ef3ca377aec910fa6c31be505e33024a405ca


Parents : 2e32f22
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-20T11:37:14+01:00

Startup checks for CLI console

Changes

2 files changed, 8 insertions(+), 3 deletions(-)

M sbapp/main.py +7 -2

Diff

diff --git a/sbapp/main.py b/sbapp/main.py
index f40e5ca7..b16f5c04 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -6958,8 +6958,13 @@ def run():
if args.interactive:
while not sideband.getstate("core.started") == True: time.sleep(0.1)
- from .sideband import console
- console.attach(sideband)
+ import importlib
+ if importlib.util.find_spec('prompt_toolkit') != None:
+ from .sideband import console
+ console.attach(sideband)
+ else:
+ print("Could not start Sideband console, since the \"prompt-toolkit\" module is not available")
+ print("You can install it with \"pip install prompt-toolkit\"")
else:
while True: time.sleep(5)

diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index 39fbc28b..2aaf7171 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -898,7 +898,7 @@ class SidebandCore():
def save_configuration(self):
self.__save_config()
- if self.is_standalone: self.owner_app.save_window_config()
+ if self.is_standalone and not self.is_daemon: self.owner_app.save_window_config()
def set_active_propagation_node(self, dest):
if dest == None:


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────